<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditLatestActivityTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditLatestActivityLabel_id}" for="id" />
                    <h:inputText id="id" value="#{latestActivityController.selected.id}" title="#{bundle.EditLatestActivityTitle_id}" required="true" requiredMessage="#{bundle.EditLatestActivityRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditLatestActivityLabel_updatedate}" for="updatedate" />
                    <h:inputText id="updatedate" value="#{latestActivityController.selected.updatedate}" title="#{bundle.EditLatestActivityTitle_updatedate}" required="true" requiredMessage="#{bundle.EditLatestActivityRequiredMessage_updatedate}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditLatestActivityLabel_heartRate}" for="heartRate" />
                    <h:inputText id="heartRate" value="#{latestActivityController.selected.heartRate}" title="#{bundle.EditLatestActivityTitle_heartRate}" required="true" requiredMessage="#{bundle.EditLatestActivityRequiredMessage_heartRate}"/>
                    <h:outputLabel value="#{bundle.EditLatestActivityLabel_oxigenLevel}" for="oxigenLevel" />
                    <h:inputText id="oxigenLevel" value="#{latestActivityController.selected.oxigenLevel}" title="#{bundle.EditLatestActivityTitle_oxigenLevel}" required="true" requiredMessage="#{bundle.EditLatestActivityRequiredMessage_oxigenLevel}"/>
                    <h:outputLabel value="#{bundle.EditLatestActivityLabel_bloodPresure}" for="bloodPresure" />
                    <h:inputText id="bloodPresure" value="#{latestActivityController.selected.bloodPresure}" title="#{bundle.EditLatestActivityTitle_bloodPresure}" required="true" requiredMessage="#{bundle.EditLatestActivityRequiredMessage_bloodPresure}"/>
                    <h:outputLabel value="#{bundle.EditLatestActivityLabel_devicehasPatientid}" for="devicehasPatientid" />
                    <h:selectOneMenu id="devicehasPatientid" value="#{latestActivityController.selected.devicehasPatientid}" title="#{bundle.EditLatestActivityTitle_devicehasPatientid}" required="true" requiredMessage="#{bundle.EditLatestActivityRequiredMessage_devicehasPatientid}">
                        <f:selectItems value="#{deviceHasPatientController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{latestActivityController.update}" value="#{bundle.EditLatestActivitySaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditLatestActivityViewLink}"/>
                <br />
                <h:commandLink action="#{latestActivityController.prepareList}" value="#{bundle.EditLatestActivityShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditLatestActivityIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
